import mitt from 'mitt';
import { ElementProperties } from '../utils/getElProperties';

export type EmitterEvents = {
  'content:remove-selected': void;
  'content:el-selected': {
    el: Element;
    properties: ElementProperties;
    triggerType?: string;
  };
  'content:float-selected': {
    value: string;
    options?: object;
  };
  'content:element-visible': {
    visible: boolean;
  };
};

export const emitter = mitt<EmitterEvents>();

export default mitt;
